﻿// 项目：	Guan.CMS.Web - Guan.CMS
// 文件名：	UserFormModel.cs
// 
// 修改时间：2013-03-08 21:25
// 修改人：	Cooclsee

using System.ComponentModel.DataAnnotations;

namespace Guan.CMS.Web.ViewModels
{
    public class UserFormModel
    {
        [Required(ErrorMessage = "必填")]
        [Display(Name = "姓名")]
        public string Name { get; set; }

        [Required(ErrorMessage = "必填")]
        [Display(Name = "用户名")]
        public string UserName { get; set; }

        [Required(ErrorMessage = "必填")]
        [DataType(DataType.EmailAddress)]
        [Display(Name = "邮箱地址")]
        public string Email { get; set; }

        [Required(ErrorMessage = "必填")]
        [StringLength(100, ErrorMessage = "{0} 长度不少于{2}。", MinimumLength = 6)]
        [DataType(DataType.Password)]
        [Display(Name = "密码")]
        public string Password { get; set; }

        [DataType(DataType.Password)]
        [Display(Name = "确认密码")]
        [System.Web.Mvc.Compare("Password", ErrorMessage = "密码和确认密码不一致。")]
        public string ConfirmPassword { get; set; }      
    }
}